import tkinter
import tkinter.font as tkfont
import os


class Window(object):
    def __init__(self):
        # 实例化一本窗体
        self.tk = tkinter.Tk()
        self.sysFont = tkfont.Font(self.tk, size=28)

        self.tk.title("初识GUI")
        self.label = tkinter.Label(master=self.tk, text="请输入姓名", font=self.sysFont)
        # 将label显示在tk窗体中
        self.label.pack()

        self.entry = tkinter.Entry(master=self.tk, font=self.sysFont)
        self.entry.pack()

        self.button = tkinter.Button(master=self.tk, text="提交", font=self.sysFont, command=self.sayHello)
        self.button.pack()

        self.tk.mainloop()

    def sayHello(self):
        # 弹出提示框
        # tkinter.messagebox.shwoinfo("你好," + self.entry.get() + '|')
        print("sssssssssssssssssssssssssssssssssss")
        self.entry.delete(0,tkinter.END)


win = Window()
